package com.qf.day02;

public class HomeWork2 {
    public static void main(String[] args) {
        //作业2：输出1~1000以内质数(只能被1或本身整除的数)

        for (int i = 2; i <=1000 ; i++) {
            int j;
            for ( j = 2; j < i; j++) {
                if (i % j == 0) {
                     break;
                 }

            }
            if(j >= i){
                System.out.println(i);
            }
        }

    }
}
